<?php include_once dirname(__FILE__).'/common/header.php'; ?>

<?php include_once dirname(__FILE__).'/common/menu.php'; ?>

var attr = <?php echo json_encode($attr) ?>;

list.grid = new ZM.GridPanel({
    url: list.baseUrl + 'api_log/getApiLogList',
    columns:[
        {header:'ID',dataIndex:'api_log_id',hidden:true},
        {header:'顾客ID',dataIndex:'customer_id',width:65,filter:{}},
        {header:'IP地址',dataIndex:'ip_address',width:100},
        {header:'请求URI',dataIndex:'request_uri',width:150,filter:{}},
        {header:'请求POST数据',dataIndex:'post_data',width:300,renderer:function(val) {
            return '<div style="word-break:break-all;word-wrap:break-word;">' + val + '</div>';
        }},
        {header:'返回数据',dataIndex:'result_data',width:300,renderer:function(val) {
            return '<div style="word-break:break-all;word-wrap:break-word;">' + val + '</div>';
        }},
        {header:'请求终端',dataIndex:'terminal'
            ,filter:{xtype:'combofield',options:[['','全部']].concat(attr.terminal_arr)}
            ,renderer:function(val) {
                return ZM.id2name(val,attr.terminal_arr);
        }},
        {header:'终端版本号',dataIndex:'appversion'},
        {header:'操作时间',dataIndex:'api_log_time_create',width:140}
    ]
});

<?php include_once dirname(__FILE__).'/common/layout.php'; ?>
list.grid.store.load();
<?php include_once dirname(__FILE__).'/common/footer.php'; ?>